import { zlRequest } from "../index";

// 获取企业列表
export const queryCompanys = (name: string) => {
  return zlRequest.get({
    url: `/company/company/searchCompanyList?name=${name}`,
    showLoading: false,
  });
};

// 匹配政策图谱
interface MatchingParamsType {
  id: string
  price: number,
  name: String
}
export const matchingPolicy = (data: MatchingParamsType) => {
  return zlRequest.get({
    url: `/article/article_policy/normalPolicy?companyId=${data.id}&revenueScale=${data.price}&companyName=${data.name}`,
    showLoading: false,
  })
}

// 根据资讯id匹配政策图谱
export const matchingPolicyByID = (id: string) => {
  return zlRequest.get({
    url: `/article/article_policy/getRelationPolicy?articleId=${id}`,
    showLoading: false,
  })
}

// 获取规划详情
export const getPlanDetail = (id: string) => {
  return zlRequest.get({ url: `/article/article_policy/getUserPlanDetail?id=${id}` })
}

// 保存规划
export const savePlanDetail = (data: any) => {
  return zlRequest.post({ url: "/article/article_policy/saveUserPlan", data })
}


// 保存规划
export const saveFollow = (data: any) => {
  return zlRequest.post({ url: "/article/article/batchFollow", data })
}
